package gui.editor;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.Assert;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;

public class RoomGlobalChatEditorInput implements IEditorInput {
	private String roomName;

	public RoomGlobalChatEditorInput(String pRoomName) {
		super();
		Assert.isNotNull(pRoomName);
		this.roomName = pRoomName;
	}

	public boolean exists() {
		return false;
	}

	public String getToolTipText() {
		return roomName;
	}

	public ImageDescriptor getImageDescriptor() {
		return null;
	}

	public String getName() {
		return roomName;
	}

	public IPersistableElement getPersistable() {
		return null;
	}

	public boolean equals(Object obj) {
		if (super.equals(obj))
			return true;
		if (!(obj instanceof RoomGlobalChatEditorInput))
			return false;
		RoomGlobalChatEditorInput other = (RoomGlobalChatEditorInput) obj;
		return roomName.equals(other.roomName);
	}

	public int hashCode() {
		return roomName.hashCode();
	}

	public Object getAdapter(Class adapter) {
		return null;
	}
}